//引入组件
import login from '@/components/business/login.vue'
import register from '@/components/business/register.vue'
import BusinessIndex from '@/components/business/index.vue'
import BusinessProfile from '@/components/business/profile.vue'
import retail from '@/components/business/retail.vue'
import retailmember from '@/components/business/retailmember.vue'
import kickback from '@/components/business/kickback.vue'
import mycoupon from '@/components/business/mycoupon.vue'
import deposit from '@/components/business/deposit.vue'
import email from '@/components/business/email.vue'
import record from '@/components/business/record.vue'


// 路由列表
const list =  [
    {
        path: 'login',
        name: 'login',
        component: login
    },
    {
        path: 'register',
        name: 'register',
        component: register
    },
    {
        path: 'index',
        name: 'BusinessIndex',
        component: BusinessIndex,
        meta: { IsLogin: true }
    },
    {
        path: 'profile',
        name: 'BusinessProfile',
        component: BusinessProfile,
        meta: { IsLogin: true }
    },
    {
        path: 'retail',
        name: 'retail',
        component: retail,
        meta: { IsLogin: true }
    },
    {
        path: 'retailmember',
        name: 'retailmember',
        component: retailmember,
        meta: { IsLogin: true }
    },
    {
        path: 'kickback',
        name: 'kickback',
        component: kickback,
        meta: { IsLogin: true }
    },
    {
        path: 'mycoupon',
        name: 'mycoupon',
        component: mycoupon,
        meta: { IsLogin: true }
    },
    {
        path: 'deposit',
        name: 'deposit',
        component: deposit,
        meta: { IsLogin: true }
    },
    {
        path: 'email',
        name: 'email',
        component: email,
        meta: { IsLogin: true }
    },
    {
        path: 'record',
        name: 'record',
        component: record,
        meta: { IsLogin: true }
    },
]

// 父组件结构
const layout = {
    template: `<router-view></router-view>`
}

export default [{
    name: 'business',
    path: '/business',
    component: layout,
    children: list
}]
